<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"   lang="zh-CN">
<head>
    <meta http-equiv=Content-Type content="text/html;charset=utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
    <title>后台管理</title>
    <link rel="stylesheet" type="text/css" href="/js/jquery-easyui-1.5.4.5/themes/default/easyui.css">
    <link rel="stylesheet" type="text/css" href="/js/jquery-easyui-1.5.4.5/themes/icon.css">
    <script src="/js/jquery-easyui-1.5.4.5/jquery.min.js"></script>
    <script src="/js/jquery-easyui-1.5.4.5/jquery.easyui.min.js"></script>
</head>

<body class="easyui-layout">
<input type="hidden" id="userId" th:value="${session.userId}">
<div data-options="region:'west',title:'后台管理',split:false" style="width:200px;">
    <ul class="easyui-tree" id="tree">
        <li>
            <span>系统管理</span>
            <ul>
                <li><span><a onclick="addTabs('业务系统管理','/tradeSys.html','tradeSys')">业务系统管理</a></span></li>
                <li><span><a onclick="addTabs('系统菜单管理','/privilege.html','privilege')">系统菜单管理</a></span></li>
                <li><span><a onclick="addTabs('组织机构管理','/department.html','department')">组织机构管理</a></span></li>
                <li><span><a onclick="addTabs('岗位信息管理','/group.html','group')">岗位信息管理</a></span></li>
                <li><span><a onclick="addTabs('身份信息管理','/identity.html','identiry')">身份信息管理</a></span></li>
                <li><span><a onclick="addTabs('用户信息管理','/user.html','user')">用户信息管理</a></span></li>
            </ul>
        </li>
    </ul>
</div>
<div data-options="region:'center'" style="padding:1px;background:#eee;" id="mainPanel"></div>
<script type="text/javascript">
    $('#mainPanel').tabs({
        border:false,
        fit:true
    });

    function addTabs(title,url,tabId){
        var tt = $('#mainPanel').tabs('getTab',title);
        url = url + "?userId="+$("#userId").val();
        var fs = '<iframe src="'+url+'" style="width:100%; height:99.5%;" scrolling="no" marginwidth="0" marginheight="0" frameborder="0" vspace="0" hspace="0"/>'
        if(tt == null){
            $('#mainPanel').tabs('add',{
                title:title,
                content:fs,
                id:tabId,
                closable:true
            });
        }else{
            $('#mainPanel').tabs('select',title);
        }

    }

</script>
</body>
</html>